#define _CRT_SECURE_NO_DEPRECATE

#include<iostream>
#include<cstring>

using namespace std;

const int MAX = 1003;

class Big_Int
{
	private:
	char int_value[MAX];
	unsigned int bits;
	
	void delete0(char * temp);
	void to_int(char * temp);
	public:
	bool input();
	Big_Int();
	Big_Int & add(const Big_Int & a,const Big_Int & b);
	void output();
    unsigned int howbits() {return bits;}
	void changebits(unsigned int n) {bits=n;}
};

Big_Int::Big_Int()
{
	int n;
	for(n=0;n<MAX;n++) int_value[n] = 0;
	bits = 0; 
}

bool Big_Int::input(void)
{
	memset(int_value,0,MAX*sizeof(char));
	char temp[MAX];
	cin >> temp;
	if(temp[0]>'9' || temp[0]<'0') return false; 
	delete0(temp);
	to_int(temp);
}

void Big_Int::delete0(char * temp)
{
	int j,i=0;
	char save[MAX];
	while(temp[i]=='0')
	{
		i++;
	}
	
	for(j=0; i<strlen(temp); j++,i++)
	{
		save[j] = temp[i];
	}
	save[j] = '\0';
	strcpy(temp, save);
}

void Big_Int::to_int(char * temp)
{
	int i;
	
	bits =strlen(temp);
	for (i=bits-1; i>=0 ;i--)
	{
		int_value[bits-1-i] = char(temp[i] - '0');
	}
}

Big_Int & Big_Int::add(const Big_Int & a,const Big_Int & b)
{
	if(a.bits >= b.bits) bits = a.bits;
	else bits = b.bits;
	
	char carry,sum;
	unsigned int i;
	carry = 0;
	for(i=0; i < bits; i++)
	{
		sum = a.int_value[i] + b.int_value[i] + carry;
		int_value[i] = sum % 10;
		carry = sum / 10;
	}
	int_value[bits] = carry;
	bits = bits + carry;
	
	return *this;
}

void Big_Int::output()
{
	int i;
	for(i=bits-1; i>=0; i--)
	{
		cout << char(int_value[i] + '0') ;
	}
}

int main(void)
{
	int T,i;
	Big_Int a,b,sum;
	cin >>  T;
	for(i=1; i<=T; i++)
	{
		a.input();
		b.input();
		sum.add(a,b);
		cout <<  "Case " << i << ":" << endl;
		a.output();
		cout << " + ";
		b.output();
		cout << " = ";
		sum .output();
		cout << endl;
		if(i!=T) cout << endl;
	}
	return 0;
}
